package org.redmap.model
{
	import org.redmap.model.*;
	
	public class Ball implements IGeometricShape{
		
		public var radius:Number;
		
		public function Ball(radius:Number=100){
			this.radius=radius;
		}
		
		public function getArea():Number
		{
		    // the formula is Pi * radius^2
		    return Math.PI * ((radius / 2)^2);
		}
		
		public function getCircumference():Number
		{
		    // the formula is Pi * radius * 2
		    return Math.PI * radius;
		}
		
		public function describe():String
		{
            var desc:String = "This shape is a Circle.\n";
            desc += "Its diameter is " + radius + " pixels.\n";
            desc += "Its area is " + getArea() + ".\n";
            desc += "Its circumference is " + getCircumference() + ".\n";    
            return desc;
		}

	}
}